import Vue from 'vue'
import Router from 'vue-router'
//用户登录
import Login from '@/login/index.vue'
//首页
import Home from '@/views/home/index.vue'
//用户信息管理
import UserInfo from '@/views/userInfo/index.vue'
//步行
import Walking from '@/views/walking/index.vue'
//单车出行
import Bicycle from '@/views/bicycle/index.vue'
//电动车出行
import Electrcars from '@/views/electrcars/index.vue'
//公交地铁出行
import Subwaybus from '@/views/subwaybus/index.vue'
//出行计费
import Billing from '@/views/billing/index.vue'
//出行周边
import Surrounding from '@/views/surrounding/index.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
      name:'home',
      path: '/home',
      component:Home,
      children:[
        //用户列表
        {
          path:'/userInfo',
          name:'UserInfo',
          component:UserInfo
        },
        //步行
        {
          path:'/walking',
          name:'Walking',
          component:Walking
        },
        //单车出行
        {
          path:'/bicycle',
          name:'Bicycle',
          component:Bicycle
        },
        //电动车出行
        {
          path:'/electrcars',
          name:'Electrcars',
          component:Electrcars
        },
        //公交地铁出行
        {
          path:'/subwaybus',
          name:'Subwaybus',
          component:Subwaybus
        },
        //出行计费
        {
          path:'/billing',
          name:'Billing',
          component:Billing,
        },
        //出行周边
        {
          path:'/surrounding',
          name:'Surrounding',
          component:Surrounding
        },
      ]
    },
  ]
})
